<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <title>Spring Security Example </title>
</head>
<body>
<div th:if="${param.error}">
    <span th:text="${param.errors}"></span>
    Invalid username and password.
</div>
<div th:if="${param.logout}">
    You have been logged out.
</div>
<div th:text="${session.formtoken}"></div>
<form th:action="@{/test/testLogin}" method="post">
    <input type="test" name="formtoken" th:value="${session.formtoken}" />
    <div><label> User Name : <input type="text" name="username"/> </label></div>
    <div><label> Password: <input type="password" name="password"/> </label></div>
    <div><input type="submit" value="登录"/></div>
    <a th:href="@{/goregister.do}">快速注册</a>
    <input type="checkbox" name="remember-me" value="true" th:checked="checked"/><p>Remember me</p>
</form>
</body>
</html>